Skip to content

fix: make shift+insert jump to song start on the song page - #136

Open
z3phyr2 wants to merge 1 commit into
polyend:mainfrom
z3phyr2:feat/jump_to_pos0
Open

z3phyr2 wants to merge 1 commit into
polyend:mainfrom
z3phyr2:feat/jump_to_pos0

Conversation

@z3phyr2

@z3phyr2 z3phyr2 commented Nov 23, 2026

Copy link
Copy Markdown

Summary & Goal

On the Song page, Shift+Insert only moves the pattern list selection up 5 positions — exactly the same as the big + button, so it is redundant. On the Pattern page, Shift+Insert jumps all the way to the top (step 0). This PR makes Shift+Insert on the Song page jump to the first song position, matching the Pattern page behavior.

Reported in: https://backstage.polyend.com/t/shift-insert-should-go-all-the-way-up-on-the-song-page/13077

Behavior & Changes

  • Song page, pattern list (green/red cursor) selected: Shift+Insert now jumps the selection to song position 0 (top of the list) instead of moving up 5.
  • Song page, song player selected: Shift+Insert is unchanged (jumps to the player home position).
  • While the song is playing in Song view, the selection cannot be moved — the existing guard is preserved.
  • Pattern page behavior is unchanged.

Implementation: new cSongEditor::goToSongTop() in core/interface/songEditor/fSongEdit.cpp, wired into functInsert() in place of changeSongPositionSelection(-300) (the argument is clamped to −5 by design, which is where the 5-step move came from).

Target Devices

  • Original Polyend Tracker (MK66)
  • Polyend Tracker+ (IMX)
  • Polyend Tracker Mini (IMX)

Hardware Testing Status

Device Tested on Hardware by Author Needs Community Hardware Testing Not Applicable Notes / Tested By
Original Tracker (MK66) [ ] [x] [ ]
Tracker+ (IMX) [x] [ ] [ ] Author's test device
Tracker Mini (IMX) [ ] [x] [ ]

How to Test

  1. Flash the .ptf for your device (Checks tab → polyend-tracker-ce-firmware artifact).
  2. Open a song with more than 5 patterns.
  3. On the Song page, select the pattern list (green cursor) and move it to the bottom of the list.
  4. Press Shift+Insert → the selection jumps to the first song position (top of the list).
  5. Select the song player area instead: Shift+Insert still jumps to the player home position as before.
  6. Start playback: Shift+Insert on the list does nothing (existing guard).
  7. Pattern page: Shift+Insert still jumps to step 0, unchanged.

The author has run the steps above on a Tracker+.

Developer Checklist

  • I have read and understood the Contribution & Pull Request Guidelines (CONTRIBUTING.md).
  • This PR implements one single feature or bug fix (no unrelated refactors or formatting sweeps).
  • make all compiles cleanly for all three devices (Original, Plus, Mini); make ptfx also verified locally (GNU Arm Embedded 10.3-2021.10, no new warnings).
  • Memory usage (SRAM_DTC, EXTERNAL_RAM, FLASH) was checked and stays within safe hardware headroom:
Device Region This PR Upstream reference (PR #128)
Original FLASH 903,700 B / 1 MB (86.18 %) —
Original EXTERNAL_RAM 15,686,400 B / 16 MB (93.50 %) 15,663,224 B (93.36 %)
Plus SRAM_DTC 346,988 B / 352 KB (96.27 %) 345,580 B (95.88 %)
Mini SRAM_DTC 345,332 B / 352 KB (95.81 %) 343,924 B (95.42 %)

(The delta vs. the reference build includes upstream commits merged after it; this fix itself adds one small UI function.)

  • No heap allocations (new/malloc) or SD card I/O were added to real-time audio callbacks.
  • Existing .mt projects, .pti instruments, .pts synth patches, and mtConfig settings remain backward-compatible.

@github-actions

Copy link
Copy Markdown

Polyend Tracker CE Test Firmware & SD Card Content

This pull request passed all build checks. You can download and test the built firmware for Original Tracker, Tracker+, and Tracker Mini (Build: 9cf4310) and the matching SD card content (/System/) directly using the links below (no GitHub account required):

How to Install & Flash on Your Tracker

1. Flashing the Firmware (.ptf)

  1. Download and unzip polyend-tracker-ce-firmware.zip.
  2. Copy the .ptf file matching your hardware to the /Firmware/ folder on your Tracker's microSD card:
    • Original Polyend Tracker: PolyendTracker_CE_9cf4310.ptf
    • Polyend Tracker+: TrackerPlus_CE_9cf4310.ptf
    • Polyend Tracker Mini: TrackerMini_CE_9cf4310.ptf
  3. Insert the microSD card into your Tracker, navigate to Config → Firmware → Firmware update, select the .ptf file, and confirm.
  4. Once rebooted, you can verify you are running this PR build under Config → Firmware (Build: 9cf4310).

2. Installing SD Card Content (/System/)

  1. Download and unzip polyend-tracker-ce-sd-card.zip.
  2. Copy the System/ folder to the root directory of your Tracker's microSD card (you can optionally rename it to .system/ if you prefer it hidden).

3. Emergency Recovery (Just in Case)

The Tracker's bootloader is hardware-isolated from the firmware. If a test build ever fails to boot:

  1. Place a known-good, stable .ptf firmware file inside the /Firmware/ folder on your microSD card (ideally as the only .ptf file in that folder).
  2. Insert the microSD card and power on your Tracker.
  3. Use a paperclip or SIM-eject pin to press the recessed hardware Reset / Emergency Bootloader pinhole button (on the bottom of Original Tracker / Tracker+, or next to the USB-C port on Tracker Mini). The bootloader will automatically flash the .ptf file from /Firmware/.
Firmware File Sizes & Linker Memory Summary

Generated .ptf Firmware Files

-rw-r--r-- 1 runner runner 2.5M Nov 23 09:31 build/PolyendTracker_CE_1fd5f22.ptf
-rw-r--r-- 1 runner runner 3.7M Nov 23 09:34 build/TrackerMini_CE_1fd5f22.ptf
-rw-r--r-- 1 runner runner 3.6M Nov 23 09:32 build/TrackerPlus_CE_1fd5f22.ptf

Bundled .psyn Synth Engines (/System/Synths)

-rw-r--r-- 1 runner runner  67K Nov 23 09:34 build/System/Synths/ACD.psyn
-rw-r--r-- 1 runner runner  48K Nov 23 09:34 build/System/Synths/CHIP.psyn
-rw-r--r-- 1 runner runner  72K Nov 23 09:34 build/System/Synths/DIRT.psyn
-rw-r--r-- 1 runner runner  65K Nov 23 09:34 build/System/Synths/FAT.psyn
-rw-r--r-- 1 runner runner 114K Nov 23 09:34 build/System/Synths/PERC.psyn
-rw-r--r-- 1 runner runner  96K Nov 23 09:34 build/System/Synths/VAP.psyn
-rw-r--r-- 1 runner runner 124K Nov 23 09:34 build/System/Synths/WTFM.psyn

Generated .ptfx Sample Editor Effects (/System/Effects)

-rw-r--r-- 1 runner runner 1.2K Nov 23 09:34 editor-fx-sdk/build/System/Effects/add_silence.ptfx
-rw-r--r-- 1 runner runner 1.2K Nov 23 09:34 editor-fx-sdk/build/System/Effects/analog_kick_gen.ptfx
-rw-r--r-- 1 runner runner 2.9K Nov 23 09:34 editor-fx-sdk/build/System/Effects/chiptune_gen.ptfx
-rw-r--r-- 1 runner runner 5.9K Nov 23 09:34 editor-fx-sdk/build/System/Effects/convolution_reverb.ptfx
-rw-r--r-- 1 runner runner 2.9K Nov 23 09:34 editor-fx-sdk/build/System/Effects/cross_mod.ptfx
-rw-r--r-- 1 runner runner 1.4K Nov 23 09:34 editor-fx-sdk/build/System/Effects/haas.ptfx
-rw-r--r-- 1 runner runner 2.1K Nov 23 09:34 editor-fx-sdk/build/System/Effects/multimode_filter.ptfx
-rw-r--r-- 1 runner runner  13K Nov 23 09:34 editor-fx-sdk/build/System/Effects/speech_gen.ptfx
-rw-r--r-- 1 runner runner 2.5K Nov 23 09:34 editor-fx-sdk/build/System/Effects/stereo_delay.ptfx
-rw-r--r-- 1 runner runner 1.4K Nov 23 09:34 editor-fx-sdk/build/System/Effects/stereo_to_mono.ptfx
-rw-r--r-- 1 runner runner 2.0K Nov 23 09:34 editor-fx-sdk/build/System/Effects/transient_shaper.ptfx

Linker Memory Usage (All 3 Devices)

 Building Original Tracker (MK66) - CE 1.0.0 (1fd5f22)
source/Drivers/ExternalSdram.cpp: In member function 'bool ExternalSDRAM::testRamBlock(int, int*)':
   56 | bool ExternalSDRAM::testRamBlock(int blockIdx, int* const startAddress)
   56 | bool ExternalSDRAM::testRamBlock(int blockIdx, int* const startAddress)
Memory region         Used Size  Region Size  %age Used
           FLASH:      903700 B         1 MB     86.18%
             RAM:      180828 B       256 KB     68.98%
    EXTERNAL_RAM:    15686400 B        16 MB     93.50%
 Building Tracker+ (IMX) - CE 1.0.0 (1fd5f22)
Memory region         Used Size  Region Size  %age Used
      QSPI_FLASH:     1314224 B     16192 KB      7.93%
        SRAM_DTC:      346988 B       352 KB     96.27%
        SRAM_ITC:       62872 B     131064 B     47.97%
         SRAM_OC:       23212 B        32 KB     70.84%
    EXTERNAL_RAM:    67093436 B        64 MB     99.98%
 Building Tracker Mini (IMX) - CE 1.0.0 (1fd5f22)
Memory region         Used Size  Region Size  %age Used
      QSPI_FLASH:     1344136 B     16256 KB      8.07%
        SRAM_DTC:      345332 B       352 KB     95.81%
        SRAM_ITC:       62856 B     131064 B     47.96%
         SRAM_OC:       23212 B        32 KB     70.84%
    EXTERNAL_RAM:    67093436 B        64 MB     99.98%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant